/* 东营旅游路线规划应用自定义样式 */

/* 全局样式优化 */
body {
  font-family: var(--ion-font-family);
  color: var(--ion-text-color);
  background-color: var(--ion-background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 地图容器样式优化 */
.mapView {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 功能面板样式优化 */
.function-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 280px;
  max-width: 90%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

/* 面板项目样式 */
.panel-item {
  margin: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.panel-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 面板标题样式 */
.panel-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(to right, var(--ion-color-primary), var(--ion-color-secondary));
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-header:hover {
  background: linear-gradient(to right, var(--ion-color-primary-shade), var(--ion-color-secondary-shade));
}

.panel-header ion-icon {
  margin-right: 10px;
  font-size: 1.2em;
}

/* 面板内容样式 */
.panel-content {
  padding: 8px 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  transition: all 0.3s ease;
}

/* 天气信息样式优化 */
.weather-info .panel-header {
  background: linear-gradient(to right, #1e88e5, #039be5);
}

.weather-info ion-item {
  --background: transparent;
  --border-color: rgba(0, 0, 0, 0.05);
  --padding-start: 16px;
  --inner-padding-end: 16px;
  --min-height: 40px;
}

.weather-info ion-icon {
  color: var(--ion-color-primary);
}

/* 搜索框样式优化 */
.search-container {
  display: flex;
  padding: 12px;
  align-items: center;
  background: rgba(236, 239, 241, 0.7);
  border-radius: 10px;
  margin: 8px;
  transition: all 0.3s ease;
}

.search-container:focus-within {
  background: rgba(236, 239, 241, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input {
  flex: 1;
  --background: rgba(255, 255, 255, 0.9);
  --border-radius: 8px;
  --padding-start: 12px;
  --padding-end: 12px;
  --placeholder-color: #78909c;
  --placeholder-opacity: 0.8;
  font-size: 0.95em;
  margin-right: 8px;
  --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.search-button {
  --padding-start: 12px;
  --padding-end: 12px;
  height: 40px;
  --background: var(--ion-color-primary);
  --color: white;
  --border-radius: 8px;
  --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  transition: all 0.2s ease;
}

.search-button:hover {
  --background: var(--ion-color-primary-shade);
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 按钮样式优化 */
ion-button {
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
  transition: all 0.2s ease;
}

ion-button:hover {
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* 定位按钮样式优化 */
#locateButton {
  position: absolute;
  bottom: 20px;
  right: 20px;
  --border-radius: 50%;
  --padding-start: 0;
  --padding-end: 0;
  height: 56px;
  width: 56px;
  margin: 0;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

#locateButton ion-icon {
  font-size: 24px;
}

/* 性能测试按钮样式 */
#performanceButton {
  position: absolute;
  bottom: 20px;
  left: 20px;
  --border-radius: 8px;
  --padding-start: 12px;
  --padding-end: 12px;
  height: 44px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* 路线卡片样式优化 */
.route-card {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 16px;
  z-index: 10;
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 8px;
}

.route-header h3 {
  margin: 0;
  color: var(--ion-color-primary);
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  --padding-start: 4px;
  --padding-end: 4px;
  --padding-top: 4px;
  --padding-bottom: 4px;
  margin: 0;
  height: 32px;
  width: 32px;
}

.route-summary {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(236, 239, 241, 0.5);
  border-radius: 8px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-item ion-icon {
  font-size: 24px;
  color: var(--ion-color-primary);
  margin-bottom: 4px;
}

.summary-item span {
  font-size: 16px;
  font-weight: 500;
  color: var(--ion-color-dark);
}

/* 导航指引样式优化 */
.route-instructions {
  margin-top: 16px;
}

.instruction-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ion-color-dark);
  margin-bottom: 12px;
}

.instructions-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
}

.instruction-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.instruction-index {
  width: 28px;
  height: 28px;
  background-color: var(--ion-color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instruction-text {
  flex: 1;
  line-height: 1.5;
  font-size: 14px;
  color: var(--ion-color-dark);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 模态框样式优化 */
ion-modal {
  --border-radius: 16px;
  --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  --backdrop-opacity: 0.6;
}

ion-modal ion-toolbar {
  --background: var(--ion-color-primary);
  --color: white;
}

ion-modal ion-title {
  font-size: 18px;
  font-weight: 500;
}

ion-modal ion-content {
  --background: #f8f9fa;
}

ion-modal ion-item {
  --background: white;
  --border-color: rgba(0, 0, 0, 0.05);
  margin-bottom: 2px;
  --border-radius: 8px;
  --padding-start: 16px;
  --inner-padding-end: 16px;
}

ion-modal ion-item-divider {
  --background: rgba(236, 239, 241, 0.8);
  --color: var(--ion-color-dark);
  font-weight: 500;
  margin-bottom: 4px;
}

/* 性能测试模态框样式 */
.performance-controls {
  padding: 12px;
  display: flex;
  justify-content: flex-end;
}

.header-row {
  font-weight: bold;
  background-color: rgba(236, 239, 241, 0.8);
  padding: 12px 0;
  border-radius: 8px 8px 0 0;
}

.data-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px 0;
  background-color: white;
}

.data-row:last-child {
  border-radius: 0 0 8px 8px;
}

.performance-tips {
  margin: 20px;
  padding: 16px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.performance-tips h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--ion-color-primary);
  font-size: 16px;
}

.performance-tips ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.performance-tips li {
  margin-bottom: 8px;
  color: var(--ion-color-dark);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .function-panel {
    width: 240px;
  }
  
  .route-card {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .function-panel {
    width: 220px;
  }
  
  .panel-header {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .search-input {
    font-size: 14px;
  }
  
  .route-card {
    padding: 12px;
  }
  
  .instruction-text {
    font-size: 13px;
  }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .function-panel {
    background: rgba(30, 30, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .panel-item {
    background: rgba(40, 40, 40, 0.7);
  }
  
  .panel-content {
    background: #1e1e1e;
  }
  
  .search-container {
    background: rgba(40, 40, 40, 0.7);
  }
  
  .search-input {
    --background: rgba(50, 50, 50, 0.9);
    --color: white;
    --placeholder-color: #aaa;
  }
  
  .route-card {
    background: #1e1e1e;
  }
  
  .route-summary {
    background: rgba(40, 40, 40, 0.5);
  }
  
  .summary-item span {
    color: #eee;
  }
  
  .instruction-text {
    color: #eee;
  }
  
  .performance-tips {
    background-color: #1e1e1e;
  }
  
  .data-row {
    background-color: #1e1e1e;
  }
}
